<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>提现记录表管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnExport").click(function(){
				top.$.jBox.confirm("确认要导出提现数据吗？","系统提示",function(v,h,f){
					if(v=="ok"){
						$("#searchForm").attr("action","${ctx}/paymentWithdrawLog/paymentWithdrawLog/export");
						$("#searchForm").submit();
					}
				},{buttonsFocus:1});
				top.$('.jbox-body .jbox-icon').css('top','55px');
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/paymentWithdrawLog/paymentWithdrawLog/?withdraw_type=${paymentWithdrawLog.withdraw_type}">提现记录表列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="paymentWithdrawLog" action="${ctx}/paymentWithdrawLog/paymentWithdrawLog/list?withdraw_type=${paymentWithdrawLog.withdraw_type}" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>提现人姓名</label>
				<form:input path="nick_name" htmlEscape="false" maxlength="20" class="input-medium"/>
			</li>
			<li><label>创建开始：</label>
				  <input name="create_date_start" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
                   value="<fmt:formatDate value="${paymentWithdrawLog.create_date_start}" pattern="yyyy-MM-dd"/>"
                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
			</li>
			<li><label>创建结束：</label>
				 <input name="create_date_end" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
                   value="<fmt:formatDate value="${paymentWithdrawLog.create_date_end}" pattern="yyyy-MM-dd"/>"
                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
			</li>
			<li><label>提现状态</label>
				<form:select path="status" class="input-xlarge required ">
					<form:options items="${fns:getPaymentWithdrawList()}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<input id="btnExport" class="btn btn-primary" type="button" value="导出"/>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
			    <th>提现人账号</th>
				<th>提现人姓名</th>
				<th>转账账号</th>
				<th>转账账号姓名</th>
				<th>提现金额</th>
				<th>提现完成状态</th>
				<th>提交时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="paymentWithdrawLog1">
			<tr>
			     <td>
					${paymentWithdrawLog1.account}
				</td>
				<td>
					${paymentWithdrawLog1.nick_name}
				</td>
				<td>
					${paymentWithdrawLog1.transfer_account}
				</td>
				<td>
					${paymentWithdrawLog1.transfer_username}
				</td>
				<td>
					${paymentWithdrawLog1.money}
				</a></td>
				<td>
					<c:if test="${paymentWithdrawLog1.status=='back'}">
						已退回
					</c:if>
					<c:if test="${paymentWithdrawLog1.status=='pass_failed'}">
						未通过
					</c:if>
				    <c:if test="${paymentWithdrawLog1.status == 'process'}">
						提现中
					 </c:if>
					 <c:if test="${paymentWithdrawLog1.status == 'complete'}">
						完成
					 </c:if>
				</td>
				<td>
					${paymentWithdrawLog1.withdraw_date}
				</td>
				<td>
				  <c:if test="${paymentWithdrawLog1.status == 'process'}">
    				<a href="${ctx}/paymentWithdrawLog/paymentWithdrawLog/audit?status=complete&id=${paymentWithdrawLog1.id}&withdraw_type=${paymentWithdrawLog.withdraw_type}" onclick="return confirmx('确认要审核通过吗？', this.href)">审核通过</a>
					<!--<a href="${ctx}/paymentWithdrawLog/paymentWithdrawLog/audit?status=pass_failed&id=${paymentWithdrawLog1.id}" onclick="return confirmx('确认要审核不通过吗？', this.href)">审核不通过</a>-->
				 </c:if>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>